home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
The World of Computer Software.iso
/
vsms111.zip
/
MAIL.BAT
< prev
next >
Wrap
DOS Batch File
|
1992-12-06
|
2KB
|
61 lines
@ECHO OFF
echo.
ECHO Mail System v1.11 MX-Multiuser DOS. By Chris Cappuccio.
echo.
IF %dostype%.==. GOTO fakeuser
:mailsys
IF %1.==console. GOTO MAILIT
IF %1.==remote. goto mailit
IF %1.==. GOTO gmail
ECHO Sorry, user %1 unknown.
ECHO Valid users are: console, remote (you must use lowercase!)
ECHO.
goto end
:MAILIT
ECHO Sending mail to %1 from %user%
ECHO *Mail to %1 from %user% >>\MXDOS\MAIL\%1.box
showtime>>\mxdos\mail\%1.box
echo.>>\mxdos\mail\%1.box
ECHO To enter message, type I to start, Control-Z and E when done.
ECHO To abort message, type Control-Z and Q.
echo.
echo Note: After you type Control-Z, I, E, or Q, press [RETURN]
echo.
EDLIN \MXDOS\MAIL\%1.TMP
IF NOT EXIST \MXDOS\MAIL\%1.TMP GOTO aborted
TYPE \MXDOS\MAIL\%1.TMP>>\MXDOS\MAIL\%1.BOX
DEL \MXDOS\MAIL\%1.TMP
ECHO.>>\MXDOS\MAIL\%1.BOX
echo Mail sent to %1.
echo.
echo Mail sent from %user% to %1 at>>\MXDOS\LOGS\MAIL.LOG
SHOWTIME>>\MXDOS\LOGS\MAIL.LOG
echo.>>\mxdos\logs\mail.log
goto end
:gmail
if not exist \MXDOS\MAIL\%USER%.BOX GOTO nomail
more <\mxdos\mail\%user%.box
ECHO Do you want to delete your mail?
YESNO
IF ERRORLEVEL 1 DEL \MXDOS\MAIL\%USER%.BOX
echo.
goto end
:nomail
ECHO You have no mail.
ECHO.
goto end
:aborted
echo.
ECHO Mail Aborted
ECHO.
ECHO *Mail Aborted By Sender>>\MXDOS\MAIL\%1.BOX
ECHO.>>\MXDOS\MAIL\%1.BOX
goto end
:fakeuser
ECHO You are not runnning under MX-Multiuser DOS. Your username
ECHO is now set to console.
ECHO.
SET USER=console
goto mailsys
:end